Generic function that accepts Vec u32 and Vec f32